#ifndef VIEWER_H
#define VIEWER_H
#include "Object.h"
#include "glm/glm.hpp"
namespace renderengine
{
    class Camera;
    class Viewer :public Object
    {
    public:
        Viewer();
        ~Viewer();
        bool init(int argc,char** argv);
        bool commit();
        std::shared_ptr<Camera> getCamera(void);

        void Resize(int width, int height);
        int getWidth(void);
        int getHeight(void);


        void mouse(int button, int state, int x, int y);
        void motion(int x, int y);
        void frame(void);
    private:
        void PrintInfo(void);
        std::shared_ptr<renderengine::Camera> m_Camera;
        int m_Width, m_Height;
        bool m_select;
        glm::vec2 m_mousePrePosition;
        glm::mat4 m_preViewMat;

    };
}
#endif // !VIEWER_H
